package com.ydh.company.mapper;

import com.ydh.company.pojo.Condition;
import com.ydh.company.pojo.PurchaseReturnGoodsDetail;
import com.ydh.company.pojo.PurchaseReturnGoodsMain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author YuYinYang
 * @date Creat at 2020/5/7
 * @description:
 **/
@Mapper
public interface PurchaseReturnGoodsMapper {
  /**
   * 新增退货订单时，增加退货单主表数据
   * @param purchaseReturnGoodsMain
   * @return
   */
  int addReturnGoodsOrderMain(PurchaseReturnGoodsMain purchaseReturnGoodsMain);

  /**
   * 新增退货订单时，增加退货单详情表表数据
   * @param purchaseReturnGoodsDetail
   * @return
   */
  int addReturnGoodsOrderDetail(PurchaseReturnGoodsDetail purchaseReturnGoodsDetail);

  /**
   * 查询退货订单列表
   * @param condition
   * @return
   */
  List<PurchaseReturnGoodsMain>  selectReturnGoodsOrderList(Condition condition);
  /**
   * 条件查询退货订单列表
   * @param condition
   * @return
   */
  List<PurchaseReturnGoodsMain>  selectReturnGoodsOrderListByCondition(Condition condition);

  /**
   * 根据退货订单号查询退货订单详情
   * @param purchaseReturnNo
   * @return
   */
  PurchaseReturnGoodsMain selectReturnGoodsOrder(@Param("purchaseReturnNo")String purchaseReturnNo);

  /**
   *查询退货订单详情数据
   * @param purchaseReturnNo
   * @return
   */
  PurchaseReturnGoodsDetail selectDetail(@Param("purchaseReturnNo")String purchaseReturnNo);
}
